Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive support for PuppetDB Query V4 APIs to the PE Client Ruby library. The implementation provides a complete interface for querying PuppetDB data including nodes, facts, catalogs, reports, resources, events, and more.
Changes:
- Added main
PuppetDBresource class with Query V4 API support - Implemented 15+ query endpoints covering nodes, facts, catalogs, reports, events, packages, and inventory
- Added specialized sub-resources for nodes, factsets, catalogs, and reports with their own endpoint methods
- Included comprehensive RSpec tests for all endpoints with required and optional parameter scenarios
- Provided RBS type signatures for type checking
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/pe_client/client.rb | Adds puppet_db accessor method to client |
| lib/pe_client/resources/puppet_db.rb | Main PuppetDB resource class with port configuration and query_v4 accessor |
| lib/pe_client/resources/puppet_db/query.v4.rb | Core Query V4 implementation with 15+ endpoint methods |
| lib/pe_client/resources/puppet_db/query.v4/nodes.rb | Node-specific endpoints for facts and resources |
| lib/pe_client/resources/puppet_db/query.v4/factsets.rb | Factset query endpoints |
| lib/pe_client/resources/puppet_db/query.v4/catalogs.rb | Catalog query endpoints with edges and resources |
| lib/pe_client/resources/puppet_db/query.v4/reports.rb | Report query endpoints with events, metrics, and logs |
| sig/pe_client/resource/puppet_db.rbs | Type signature for main PuppetDB resource |
| sig/pe_client/resource/puppet_db/query.v4.rbs | Type signatures for Query V4 endpoints |
| sig/pe_client/resource/puppet_db/query.v4/nodes.rbs | Type signatures for nodes sub-resource |
| sig/pe_client/resource/puppet_db/query.v4/factsets.rbs | Type signatures for factsets sub-resource |
| sig/pe_client/resource/puppet_db/query.v4/catalogs.rbs | Type signatures for catalogs sub-resource |
| sig/pe_client/resource/puppet_db/query.v4/reports.rbs | Type signatures for reports sub-resource |
| spec/pe_client/resources/puppet_db_spec.rb | Tests for main PuppetDB resource initialization and memoization |
| spec/pe_client/resources/puppet_db/query_v4_spec.rb | Comprehensive tests for all Query V4 endpoints |
| spec/pe_client/resources/puppet_db/query_v4/nodes_spec.rb | Tests for node-specific endpoints |
| spec/pe_client/resources/puppet_db/query_v4/factsets_spec.rb | Tests for factset endpoints |
| spec/pe_client/resources/puppet_db/query_v4/catalogs_spec.rb | Tests for catalog endpoints |
| spec/pe_client/resources/puppet_db/query_v4/reports_spec.rb | Tests for report endpoints |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fixed `resource` URI generation fixed working of `Nodes` class documentation fixed missing RBS definition fixed kwargs type definition added missing URI construction tests
212d7bb to
2b23079
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: Yard-lint is currently failing due to handling of YARD macros. This will be resolved once mensfeld/yard-lint#65 is merged